<template>
              <el-dropdown trigger="click" @command="handleCommand"  style="margin-right:10px;">
                  <span class="el-dropdown-link">
                    <i class="el-icon-sort app_search"></i>
                  </span>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item :class="[sortType=='Default'?'dropdownslect':'dropdown']"  command="Default"><i v-if="sortType=='Default'" class="el-icon-check"></i>默认排序</el-dropdown-item>
                    <el-dropdown-item :class="[sortType=='CreationTime'?'dropdownslect':'dropdown']"   command="CreationTime"><i v-if="sortType=='CreationTime'" class="el-icon-check"></i>创建时间</el-dropdown-item>
                    <el-dropdown-item :class="[sortType=='Updatetime'?'dropdownslect':'dropdown']"   command="Updatetime"><i v-if="sortType=='Updatetime'" class="el-icon-check"></i>更新时间</el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
</template>
<script>
 export default({
     data () {
         return {
             sortType:"Default"

         }
     },
     methods: {
     handleCommand(item){
      this.sortType=item
    },
     }
 })
</script>
 <style scoped>
 .dropdownslect{
     cursor: pointer;
      display: block;
      height: auto;
      text-align: left;
      border: none;
      color: #2e405e;
      padding: .71428571rem 1.14285714rem!important;
      font-size: 14px;
      text-transform: none;
      font-weight: 400;
      box-shadow: none;
      line-height: 24px;
      background-color: #e8f4ff;
      color: #46a6ff;
}
.dropdown{
     cursor: pointer;
      display: block;
      height: auto;
      text-align: left;
      border: none;
      color: #2e405e;
      padding: .71428571rem 1.14285714rem!important;
      font-size: 14px;
      text-transform: none;
      font-weight: 400;
      box-shadow: none;
      line-height: 24px;
}
.el-dropdown-link:focus{
  /* width: 93px;   */
  display: block;
  box-sizing: border-box;
 font-size: 14px;
  font-weight: 700;
  color: rgb(46, 64, 94);
  padding: 8px;
  border-radius: 10px;
  border: 3px solid #167EF8;
}
</style>
